package fr.afcepf.ai89.esharing.data;

import java.util.List;

import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;

import fr.afcepf.ai89.esharing.entity.Marque;
import fr.afcepf.ai89.esharing.entity.TypeAem;

@Stateless
public class DAOMarque implements IDAOMarque {

	@PersistenceContext(unitName = "ESharingPhase22")
	EntityManager em;

	@Override
	public Marque getMarque(int idMarque) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<Marque> getMarques() {
		
		Query hql = em.createQuery("SELECT m from Marque m");

		List<Marque> marques = (List<Marque>)hql.getResultList();

		return marques;
		
	}

	@Override
	public int addMarque(Marque marque) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int majMarque(Marque marque) {
		// TODO Auto-generated method stub
		return 0;
	}

}
